apiready = function() {
    seajs.use(['../../V', "../../api", "../../jquery", "../../app", "../../service"], function(V, $api, $, $app, service) {
        var vm = {
            el: '.container',
            data: {
                is_group: false,
                order_id: 0,
                list: '',
                goodsLength: 0,
                name: ''
            },
            methods: {
                init: function() {
                    this.getList();
                },
                getList: function() {
                    var unionid = $api.getStorage("shop_unionid"),
                        self = this;
                    $app.ajax(service.buyGetOrderDetail, {
                        data: {
                            values: {
                                unionid: unionid,
                                order_id: self.order_id
                            }
                        }
                    }, function(res) {
                        console.log("selectServer: " + JSON.stringify(res));
                        if (res.code == 0) {
                            self.list = res.data;
                            self.goodsLength = self.list.goods.length;
                        }
                    });
                },
                selectServer: function(et) {
                    var index = +et.currentTarget.dataset.index + 1;
                    $app.openWin("buyRefundApply", {
                        type: index,
                        order_id: this.order_id,
                        is_group: this.is_group,
                        name: this.name
                    });
                }
            },
            mounted: function() {
                api.setStatusBarStyle({
                    style: 'dark',
                    color: ''
                });
            },
            created: function() {
                this.is_group = api.pageParam.is_group;
                this.order_id = api.pageParam.order_id;
                this.name = api.pageParam.prve;
                this.init();
            }
        };
        //var shopVue = new Vue(vm);
        var even = function() {

        };
        var newVue = new Vue(vm);
        even();

    })
}
